package builder;

import java.util.Vector;

import model.Action;

public class PrototypeBuilder extends AbstractPatternBuilder {

	private String client = "Client";
	private String prototype = "Prototype";
	private String concretePrototype1 = "ConcretePrototype1";
	private String concretePrototype2 = "ConcretePrototype2";
	
	public PrototypeBuilder() {
		super();
	}

	@Override
	public Vector<Action> buildPattern() {
		
		this.buildClass(client);	
		this.buildClass(concretePrototype1);	
		this.buildClass(concretePrototype2);
			
		this.buildAbstractClass(prototype);
		
		this.buildGeneralization(concretePrototype1, prototype);
		this.buildGeneralization(concretePrototype2, prototype);
		
		this.buildAssociation(client, prototype);
		
		return patternActions;
	}

	@Override
	public void changeNames() {

		client = names.get(0);
		prototype = names.get(1);
		concretePrototype1 = names.get(2);
		concretePrototype2 = names.get(3);	
		
	}
	
	@Override
	public int cantUMLElements() {
		return 4;
	}

}
